
import request from '@/utils/request'


const blogBaseUrl =  process.env.VUE_APP_CONTENXT_PATH + "/blog";


const baseUrl = "/blogs-admin";


export function getBlogInfoById(id) {
    return request({
        url: blogBaseUrl + "/" + id,
        method: 'get',
    })
}

export function getBlogTypeList(query) {
    return request({
        url: blogBaseUrl + '/type',
        method: 'get',
        params: query
    })
}


export function findBlogByCondition(data) {
    return request({
        url: blogBaseUrl + '/page',
        method: 'post',
        data: data
    })
}

export function upload(formdata) {
    return request({
        url: baseUrl + '/image/upload/',
        method: 'post',
        data: formdata
    })
}


export function submitBlogInfo(blogInfo) {
    return request({
        url: blogBaseUrl + '/saveBlogInfo/',
        method: 'post',
        data: blogInfo
    })
}

